using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using ERPBackend.Models;

namespace ERPBackend.Services
{
    public interface ISalesContractService
    {
        /// <summary>
        /// 获取所有销售合同
        /// </summary>
        Task<List<SalesContract>> GetAllSalesContractsAsync();

        /// <summary>
        /// 根据ID获取销售合同
        /// </summary>
        Task<SalesContract> GetSalesContractByIdAsync(int id);

        /// <summary>
        /// 创建销售合同
        /// </summary>
        Task<SalesContract> CreateSalesContractAsync(SalesContract salesContract);

        /// <summary>
        /// 更新销售合同
        /// </summary>
        Task<bool> UpdateSalesContractAsync(SalesContract salesContract);

        /// <summary>
        /// 审核销售合同
        /// </summary>
        Task<bool> ApproveSalesContractAsync(int id, int approvedBy);

        /// <summary>
        /// 终止销售合同
        /// </summary>
        Task<bool> TerminateSalesContractAsync(int id, int terminatedBy, string reason);

        /// <summary>
        /// 删除销售合同
        /// </summary>
        Task<bool> DeleteSalesContractAsync(int id);

        /// <summary>
        /// 搜索销售合同
        /// </summary>
        Task<List<SalesContract>> SearchSalesContractsAsync(string keyword = null, int? customerId = null, int? status = null);
    }
}